![]() |
FSGetForkCBInfo |
||||
Header: | Files.h | Carbon status: | Supported | |
Returns information about a specified open fork, or for all open forks.
OSErr FSGetForkCBInfo ( SInt16 desiredRefNum, FSVolumeRefNum volume, SInt16 *iterator, SInt16 *actualRefNum, FSForkInfo *forkInfo, FSRef *ref, HFSUniStr255 *outForkName );
If you want information on a specific refnum, set desiredRefNum to that value, and pass NULL for iterator. If this value is non-zero on input, then the function gets information for the fork specified by this reference number; this value is unchanged on output. If this value is zero on input, the function iterates over all open forks (possibly limited to a single volume). On output, this parameter contains the fork's reference number.
Used when desiredRefNum is zero on input. Set this parameter to 0 to iterate over all volumes. Set this parameter to a FSVolumeRefNum to limit iteration to that volume.
A pointer to an iterator, used when desiredRefNum is zero on input. Set to 0 before iterating. Pass the iterator returned by the previous call to continue iterating.
On return, a pointer to the reference number of the open fork. This parameter is optional; if you do not wish to retrieve this value, set actualRefNum to NULL.
On return, a pointer to a FSForkInfo structure containing various information about the open fork. This parameter is optional; if you do not wish to retrieve this value, set forkInfo to NULL.
On return, a pointer to the FSRef for the file or directory that contains the fork. This parameter is optional; if you do not wish to retrieve this value, set ref to NULL.
On return, a pointer to the name of the fork. This parameter is optional; if you do not wish to retrieve this value, set outForkName to NULL.
A result code.
If you want to iterate over all open forks (or all open forks for a specific volume), set volume to the desired volume reference number, or the constant kFSInvalidVolumeRefNum to specify all volumes. Set iterator to 0 before the first call. Set desiredRefNum to zero. Upon completion of the call, iterator will be updated and that updated value should be passed into the next call. The call returns errFSNoMoreItems if there are no more open forks to return.
The well-known data fork (i.e. the fork whose name is the empty string, returned by FSGetDataForkName) will always have a forkID of zero. You should not make any assumption about the forkID of the well-known resource fork (whose name is returned by FSGetResourceForkName).
Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)